#include <stdlib.h>
#include <stdio.h>
#include "i2c.h"


#define MOTOR_CHIP 0x08

#define CHANNELS_CONFIG 0x80
#define CHANNEL_A_SPEED 0x81
#define CHANNEL_B_SPEED 0x82
	
#define RUN	  0
#define FREE  1
#define BRAKE 2

#define CONFIG_MASK 0x7
#define DIR_MASK 0x08

#define CHANNELA_DECAL 0
#define CHANNELB_DECAL 4


void setChannelASpeed(__u8 value);
void setChannelARun();
void setChannelABrake();
void setChannelBSpeed(__u8 value);
void setChannelBRun();
void setChannelBBrake();
void setChannelADirection(int dir);
void setChannelBDirection(int dir);
